﻿<phone:PhoneApplicationPage
    x:Class="Ch9RSS_WP8.ItemPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    xmlns:convert="clr-namespace:Ch9RSS_WP8.Converters"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d"
    shell:SystemTray.IsVisible="True">

    <phone:PhoneApplicationPage.Resources>
        <convert:GroupToMediaConverter x:Key="GroupToMedia" />
    </phone:PhoneApplicationPage.Resources>
    <Grid x:Name="LayoutRoot">

        <Grid.RowDefinitions>
            <RowDefinition x:Name="TopRow" Height="Auto"/>
            <RowDefinition x:Name="MiddleRow" Height="Auto"/>
            <RowDefinition x:Name="BottomRow" Height="*" />
        </Grid.RowDefinitions>

        <!-- TitlePanel -->
        <StackPanel Grid.Row="0" Margin="0,0,0,0" Background="{StaticResource Ch9Orange}">
            <TextBlock Margin="12,5,0,5" Foreground="White"  Text="CHANNEL 9 VIEWER" 
                       />
        </StackPanel>

        <!--TODO: Content should be placed within the following grid 
                  to show details for the current item -->
        <MediaElement x:Name="itemVideo"
                Grid.Row="1"
                Source="{Binding Ch9Post.group, Converter={StaticResource GroupToMedia}}"
                AutoPlay="True" 
                
                      >
        </MediaElement>

        <!--<play:MediaPlayer 
                x:Name="sidePlayer" 
                Grid.Row="1" 
                Margin="20" 
                IsPauseEnabled="True"
                Source="{Binding Ch9Post.group, Converter={StaticResource GroupToMedia}}" 
                
                AutoPlay="False" 
                IsFullScreenVisible="True"
                IsFullScreenChanged="sidePlayer_IsFullScreenChanged" 
                IsPauseAllowedChanged="PauseAllowedChanged" 
                MediaOpened="MediaOpened" 
                />-->

        <Grid  x:Name="ContentRoot" Grid.Row="2">
            <phone:WebBrowser x:Name="itemContentView" ></phone:WebBrowser>

        </Grid>
    </Grid>

</phone:PhoneApplicationPage>